//
//  WodeshoucangCollectionViewCell.m
//  tianjin
//
//  Created by 鞠超 on 16/8/12.
//  Copyright © 2016年 jc. All rights reserved.
//

#import "WodeshoucangCollectionViewCell.h"

@implementation WodeshoucangCollectionViewCell

- (instancetype )initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    
    if(self)
    {
        [self p_setupView];
    }
    
    return self;
}

- (void )p_setupView
{
    CGFloat length_x = (SCREEN_WIDTH - 30) / 2;
    
    self.image_product = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, length_x, length_x)];
//    self.image_product.image = [UIImage imageNamed:@"cainixihuan@2x.png"];
    [self.contentView addSubview:self.image_product];
    
    self.name_product = [[UILabel alloc] initWithFrame:CGRectMake(7, CGRectGetMaxY(self.image_product.frame) + 7, length_x - 8, 15)];
    self.name_product.text = @"产品名称产品名称";
    self.name_product.font = [UIFont systemFontOfSize:15];
    [self.contentView addSubview:self.name_product];
    
    self.price_product = [[UILabel alloc] initWithFrame:CGRectMake(6, CGRectGetMaxY(self.name_product.frame) + 8, length_x - 6 - 32, 15)];
    self.price_product.text = @"￥0.00";
    self.price_product.textColor = [UIColor redColor];
    self.price_product.font = [UIFont systemFontOfSize:15];
    [self.contentView addSubview:self.price_product];
    
    self.btn_select = [UIButton buttonWithType:(UIButtonTypeSystem)];
    self.btn_select.frame = CGRectMake(length_x - 5 - 23, length_x + 55 - 7 - 23, 23, 23);
    [self.btn_select setBackgroundImage:[UIImage imageNamed:@"weixuanzhong@2x.png"] forState:(UIControlStateNormal)];
    [self.contentView addSubview:self.btn_select];
    self.btn_select.hidden = YES;
}



@end
